<?php
// +----------------------------------------------------------------------
// | QSCMS
// +----------------------------------------------------------------------
// | Copyright (c)  2025 https://www.qqss.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed QSCMS is not free software, commercial use must purchase official license from official website to avoid unnecessary legal disputes.
// +----------------------------------------------------------------------
// | Author: Contract 990504246@qq.com
// +----------------------------------------------------------------------

namespace app\common\exception;

use Exception;
use support\Response;

/**
 * HTML响应异常类
 * 用于在需要返回HTML页面时抛出异常
 */
class HtmlResponseException extends Exception
{
    protected $response;

    public function __construct(Response $response, $message = '', $code = 0, Exception $previous = null)
    {
        parent::__construct($message, $code, $previous);
        $this->response = $response;
    }

    /**
     * 获取响应对象
     * @return Response
     */
    public function getResponse(): Response
    {
        return $this->response;
    }
}
